package com.example.lotterysystem.controller.param;

import lombok.Data;

import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * Description: 奖品列表参数
 * User: Spider-Man
 * Date: 2025-09-11
 * Time: 18:02
 */
@Data
public class PageParam implements Serializable {
    private Integer currentPage = 1;//默认是第一页

    //每页展示的数量
    private Integer pageSize = 10;//默认为10

    /**
     * 获取偏移量
     * @return
     */
    public Integer offset() {
        return (currentPage-1)*pageSize;
    }
}
